<?php
/**
 * Created by PhpStorm.
 * User: wenQing
 * Date: 2016/11/23
 * Time: 11:22
 */
namespace App\Http\Transformers;

use League\Fractal\TransformerAbstract;

class NewsTransformer extends TransformerAbstract
{
    public function transform($new)
    {
        return [
            'id' => $new['id'],
            'classid' => $new['classid'],
            'newspath' => $new['newspath'],
            'title' => $new['title'],
            'newstext' => $new['newstext']
        ];
    }
}